package edu.nf.dao.impl;


import edu.nf.SQLExecutor;
import edu.nf.beans.annotations.Component;
import edu.nf.dao.FindEmpByIdDao;
import edu.nf.entity.Emp;
import edu.nf.handler.BeanHandler;
import edu.nf.utils.DBUtil;

@Component("findEmpById")
public class FindEmpByIdDaoImpl implements FindEmpByIdDao {


    @Override
    public Emp findEmpByEmpId(String empid) {
        String sql = "SELECT * FROM STU_INFO WHERE STU_ID  = ?";
        SQLExecutor se = new SQLExecutor(DBUtil.getConnection());
        BeanHandler handler = new BeanHandler(Emp.class);
        return se.executeQuery(sql, handler, empid);
}
